package user;

import com.bit.utils.FileUtils;
import user.factory.AdminUserFactory;
import user.factory.IUserFactory;
import user.factory.NormalUserFactory;

public class UserManagement {

    public static void main(String[] args) {
        IUserFactory adminUserFactory = new AdminUserFactory();
        User adminUser = adminUserFactory.createUser("刘备", 1);

        IUserFactory normalUserFactory = new NormalUserFactory();

        User normalUser1 = normalUserFactory.createUser("关羽", 2);

        User normalUser2 = normalUserFactory.createUser("张飞", 3);


        ProxyUser proxyUserAdmin = new ProxyUser(adminUser);
        //proxyUserAdmin.borrowBook("HHEHHH");

        ProxyUser proxyUserNormal1 = new ProxyUser(normalUser1);
        //proxyUserNormal1.addBook("dfsafsa");


        ProxyUser proxyUserNormal2 = new ProxyUser(normalUser2);


    }

    public static void main1(String[] args) {
        // 直接创建管理员用户
       AdminUser adminUser = new AdminUser("刘备", 1);
        // 直接创建普通用户
        NormalUser normalUser1 = new NormalUser("关羽", 2);

        NormalUser normalUser2 = new NormalUser("张飞", 3);
    }
}
